﻿@{
    ViewBag.Title = "MessageAudit";
}


@model LY.Entity.Entities.U_Message_EX
@section htmlhead{
    <link href="~/assets/css/Layout/css/main.css" rel="stylesheet" />
    <link href="~/assets/css/plugin/validator.css" rel="stylesheet" />
}
<div class="container" style="height: 1000px;">

    <div id="forms" class="mt10">
        <div class="box">
            <div class="box_border">
                <div class="box_top"><b class="pl15">留言编辑</b></div>
                <div class="box_center">
                    <form method="post" id="frmEdit" action="@Url.Action("MessageSave")" class="jqtransform">
                        <input id="hideId" name="Id" value="@Model.Id" type="hidden" />
                        <table class="form_table pt15 pb15" width="100%" border="0" cellpadding="0" cellspacing="0">
                             <tr>
                                <td><b class="pl15 td_right">留言审核</b></td>
                            </tr>
                            <tr>
                                <td class="td_right">标题：</td>
                                <td class="">
                                    <input type="search" name="MessTitle" id="MessTitle" value="@Model.MessTitle" class="input-text lh30" size="100">
                                </td>
                            </tr>
                              <tr>
                                <td class="td_right">类别：</td>
                                <td class="">
                                    @Html.ResourceDropDownList("ClassQUESTION","QUESTIONTYPE",@Model.ClassId,new {@class="wh80 select" })
                                   @* <input type="text" name="ClassId" id="ClassId" value="@Model.ClassId" class="input-text lh30" size="100">*@
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">内容：</td>
                                <td class="">
                                    <textarea id="MessContent" name="MessContent"   style="width:60%;height:280px;border:1px solid #BAC7D2"> @Model.MessContent
                                    </textarea>
                                   @*<input id="MessContent" name="MessContent" value=" @Model.MessContent" type="text" style="width:90%;height:120px; border:1px solid gray;" />*@
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">留言时间：</td>
                                <td class="">
                                    <input type="time"  onclick="WdatePicker()" readonly="true" name="CreateTime" id="CreateTime" value="@Model.CreateTime" class="input-text lh30"size="40" />
                                </td>
                            </tr>
                             <tr>
                                <td><b class="pl15 td_right">留言审核</b></td>
                            </tr>
                            <tr>
                                <td class="td_right">审核说明：</td>
                                <td class="" colspan="3">
                                    <input type="text" id="AuditExplain" name="auditremark"  value="" class="input-text lh30" size="40">
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">审核日期：</td>
                                <td class="">
                                    <input type="text" name="datetime"  disabled="disabled" id="AuditTime"  value="@DateTime.Now.ToString()" class="input-text lh30" size="40" />
                                </td>

                                <td class="td_right">审核人：</td>
                                <td class="">
                                    <input type="text" name="audituser" disabled="disabled" id="AuditUser" value="@ViewBag.audituser" class="input-text lh30" size="40">
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right"></td>
                                <td class=""></td>
                            </tr>
                            <tr>
                                <td class="td_right">&nbsp;</td>
                                <td class="">
                                    <input id="btnaudit" type="button" style=" text-align:center; margin-left:450px;" name="button" class="btn btn82 btn_save2" value="审核">
                                    <input id="btnback" type="button" style=" margin-left:20px;" name="button" class="btn btn82 btn_res" value="退回">
                                    <input id="btnReturn" type="button" style=" margin-left:20px;" name="button" class="btn btn82 btn_res" value="取消">
                                </td>
                            </tr>
                        </table>
                        <input type="hidden" id="hideMessContent" name="MessContent" />
                        <input type="hidden" id="hideReplyContent" name="ReplyContent" />
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@section jssection{
    <script type="text/javascript">
        var util = {};
        var options = {
            AuditUrl:"@Url.Action("Audit")"
        };

        $("#btnReturn").click(function () {
            window.location.href = "/Member/MessageAuditlist.html";
        });
        //审核
        $("#btnaudit").click(function (e) {
            $.post(options.AuditUrl, { id: $('#hideId').val(), audituser: $('#AuditUser').val(), status: 0, datetime: $('#AuditTime').val(), auditremark: $('#AuditExplain').val() },
              function (res) {
                  if (res > 0) {
                      alert("操作成功！");
                      window.location.href = "/Member/MessageAuditlist.html";
                  }
                  else {
                      alert("操作失败！");
                  }
              },
              "json"
        );
        });

        //退回
        $("#btnback").click(function (e) {
            $.post(options.AuditUrl, { id: $('#hideId').val(), audituser: $('#AuditUser').val(), status: 2, datetime: $('#AuditTime').val(), auditremark: $('#AuditExplain').val() },
              function (res) {
                  if (res > 0) {
                      alert("操作成功！");
                      window.location.href = "/Member/MessageAuditlist.html";
                  }
                  else {
                      alert("操作失败！");
                  }
              },
              "json"
        );
        });


    </script>
    <script src="~/assets/DatePicker/calendar5.js"></script>
    <script src="~/assets/DatePicker/WdatePicker.js"></script>
    <script src="~/assets/js/common.js"></script>
    <script src="~/assets/plugins/validator/validator.js"></script>
 
}

